Skip to content

Add request compression config fields to generated clients - #994

Open
stobrien89 wants to merge 2 commits into
developfrom
python-client-request-compression
Open

stobrien89 wants to merge 2 commits into
developfrom
python-client-request-compression

Conversation

@stobrien89

Copy link
Copy Markdown
Contributor

Issue #, if available:

Pairs with #855, which adds the runtime.

Description of changes:

Generated configs get the request compression fields when an operation has the smithy.api#requestCompression trait, matching the Java RequestCompressionIntegration in #855:

  • disable_request_compression: bool, default False
  • request_min_compression_size_bytes: int, default 10240

Only non-AWS configs get them from the generator. AWS configs inherit both from AwsConfig in #855, which also resolves them from the environment and profile. The compression itself stays in the runtime, and the generator only declares the fields. Both names are reserved so a client context param can't take them.

Unlike Java, the fields only appear when the model uses the trait, like disable_host_prefix_injection.

The SDKAppliedContentEncoding_* vectors stay strict xfails until #855's runtime lands. One thing to check there: #855 compresses in the async protocols, but the Python generator also writes sync clients.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@stobrien89
stobrien89 requested a review from a team as a code owner November 27, 2026 22:37

@kuhe kuhe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add this to the frankenstein model?

@stobrien89
stobrien89 force-pushed the python-client-request-compression branch from d69b4aa to 7f1886b Compare November 30, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants